﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApp1
{
   internal  class Dog
    {
        //只能在 internal 使用
        public string Nickname { get; set; }
        public int age;
        public string Sex { get; set; }
        public string type { get; set; }




        public void Set(int value)
        {
            if (value > 0 && value < 120)
            {
                age = value;

            }
            else
            {
                age = 0;
            }

        }
        public int Get()

        {
            return age;
        }



    }
}
